public class FactoryDemo {
    public static void main(String[] args) {
        Factory factory = new ConcreteFactory();
        Product productA = factory.factoryMethod("A");
        Product productB = factory.factoryMethod("B");

        productA.use(); // 输出 "Using A"
        productB.use(); // 输出 "Using B"
    }
}
